--This Test Should have 2 children for both pass and fail task
INSERT INTO AUTOSC.CFG_REQUEST_TYPE (REQUEST_TYPE_ID, REQUEST_TYPE_NAME, IS_REQUESTABLE) VALUES(CFG_REQUEST_TYPE_SEQ.nextVal, 'JUNIT_TEST_REQUEST_TYPE_08', 'Y');

INSERT INTO AUTOSC.CFG_TASK_TYPE ( TASK_TYPE_ID, TASK_TYPE_NAME, TASK_CATEGORY_ID, MAX_RETRY_COUNT, CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) 
VALUES ( CFG_TASK_TYPE_SEQ.nextVal, 'JUNIT_TEST_TASK_TYPE_08_A', (SELECT TASK_CATEGORY_ID FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE TASK_CATEGORY='SWEEP'), 2, 'D', 'T', 5, 1440 );

INSERT INTO AUTOSC.CFG_REQUEST_DEFN (REQUEST_DEFN_ID, REQUEST_TYPE_ID, MODALITY, MODEL_TYPE, REQUEST_DESC, INITIAL_TASK_ID, REQUESTER, VERIFIER, EXPIRES_ON)
 VALUES(CFG_REQUEST_DEFN_SEQ.nextVal, (SELECT REQUEST_TYPE_ID FROM AUTOSC.CFG_REQUEST_TYPE WHERE REQUEST_TYPE_NAME='JUNIT_TEST_REQUEST_TYPE_08'), 'GST', 'GST', 'JUNIT_TEST_TYPE_DEFN_08', (SELECT TASK_TYPE_ID FROM AUTOSC.CFG_TASK_TYPE WHERE TASK_TYPE_NAME='JUNIT_TEST_TASK_TYPE_01_A'), 'navdeep.mahajan@ge.com', 'navdeep.mahajan@ge.com', (SYSDATE+365));
INSERT INTO AUTOSC.CFG_REQUEST_DEFN (REQUEST_DEFN_ID, REQUEST_TYPE_ID, MODALITY, MODEL_TYPE, REQUEST_DESC, INITIAL_TASK_ID, REQUESTER, VERIFIER, EXPIRES_ON)
 VALUES(CFG_REQUEST_DEFN_SEQ.nextVal, (SELECT REQUEST_TYPE_ID FROM AUTOSC.CFG_REQUEST_TYPE WHERE REQUEST_TYPE_NAME='JUNIT_TEST_REQUEST_TYPE_08'), 'GST', '*', 'JUNIT_TEST_TYPE_DEFN_08', (SELECT TASK_TYPE_ID FROM AUTOSC.CFG_TASK_TYPE WHERE TASK_TYPE_NAME='JUNIT_TEST_TASK_TYPE_01_A'), 'navdeep.mahajan@ge.com', 'navdeep.mahajan@ge.com', (SYSDATE+365));

--Requires test set 1 to have been already executed
INSERT INTO AUTOSC.CFG_TASK_RELATIONSHIP ( RELATION_ID, PARENT_ID, CHILD_ID) VALUES ( AUTOSC.CFG_TASK_RELATIONSHIP_SEQ.nextVal,(SELECT TASK_TYPE_ID FROM AUTOSC.CFG_TASK_TYPE WHERE TASK_TYPE_NAME='JUNIT_TEST_TASK_TYPE_08_A') , (SELECT TASK_TYPE_ID FROM AUTOSC.CFG_TASK_TYPE WHERE TASK_TYPE_NAME='JUNIT_TEST_TASK_TYPE_01_B'));
INSERT INTO AUTOSC.CFG_TASK_RELATIONSHIP ( RELATION_ID, PARENT_ID, CHILD_ID) VALUES ( AUTOSC.CFG_TASK_RELATIONSHIP_SEQ.nextVal,(SELECT TASK_TYPE_ID FROM AUTOSC.CFG_TASK_TYPE WHERE TASK_TYPE_NAME='JUNIT_TEST_TASK_TYPE_08_A') , (SELECT TASK_TYPE_ID FROM AUTOSC.CFG_TASK_TYPE WHERE TASK_TYPE_NAME='JUNIT_TEST_TASK_TYPE_01_C'));
INSERT INTO AUTOSC.CFG_TASK_RELATIONSHIP ( RELATION_ID, PARENT_ID, CHILD_ID) VALUES ( AUTOSC.CFG_TASK_RELATIONSHIP_SEQ.nextVal,(SELECT TASK_TYPE_ID FROM AUTOSC.CFG_TASK_TYPE WHERE TASK_TYPE_NAME='JUNIT_TEST_TASK_TYPE_08_A') , (SELECT TASK_TYPE_ID FROM AUTOSC.CFG_TASK_TYPE WHERE TASK_TYPE_NAME='JUNIT_TEST_TASK_TYPE_01_D'));

Commit;